package com.innovation.chengzhangriji.ui.widget;

import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;

import com.innovation.chengzhangriji.R;

public class ThemeView extends LinearLayout {

    private CuteTwoButton[] mBtnArray;

    public ThemeView(Context context) {
        super(context);
        init(context);
    }

    public ThemeView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    public ThemeView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }

    private void init(Context context) {
        setBackgroundColor(Color.WHITE);
        setOrientation(LinearLayout.HORIZONTAL);
        LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        inflater.inflate(R.layout.layout_theme, this);
        mBtnArray = new CuteTwoButton[4];
        mBtnArray[0] = (CuteTwoButton) findViewById(R.id.btn_1);
        mBtnArray[1] = (CuteTwoButton) findViewById(R.id.btn_2);
        mBtnArray[2] = (CuteTwoButton) findViewById(R.id.btn_3);
        mBtnArray[3] = (CuteTwoButton) findViewById(R.id.btn_4);
    }
}
